﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Disco.Core;

namespace Disco.Web.Client.Controllers
{
    public class HomeController : Controller
    {
        public HomeController()
        {
            ViewBag.Version = String.Concat("Version ", 
                System.Diagnostics.FileVersionInfo.
                GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).
                ProductVersion);
        }

        public ActionResult Index(string returnUrl)
        {
            ViewBag.ReturnUrl = returnUrl;
            return View();
        }

        public ActionResult About()
        {
            return View(new VersionInfo());
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View("Index");
        }

        public ActionResult ApiHelp()
        {
            return Redirect("/api/Help");
        }
    }
}
